<template>
    <div class="login-box">
        <div class="login-top">
            <div>
                <span class="one">账号登录</span>
                <span class="two">(直接登录即可)</span>
            </div>
        </div>
        <div class="login-motif">
            <div>
                <input type="text" placeholder="用户名">
            </div>
            <div>
                <input type="text" placeholder="密码">
            </div>
            <div>
                <input type="button" value="登录" @click="doLogin()">
            </div>
        </div>
    </div>
</template>
<script>
export default {
    methods:{
        doLogin(){
            // 模拟登录
            localStorage.setItem("token","asa");
            // 登录成功后返回的页面
            let path = this.$route.params.url;

            if(!path){
                path = "/"
            }
            this.$router.push(path); 
        }
    }
}
</script>
<style lang="less" scoped>
.login-box{
    width: 100%;
    .login-top{
        width: 100%;
        height: 120px;
        display: flex;
        justify-content: center;
        align-items: center;
        border-bottom: 1px solid @cc;
        .one{
            font-size: 40px;
            font-weight: bold;
        }
        .two{
            font-size:26px;
            font-weight: bold;
            margin-left: 20px;
            color: @99;
        }
    }
    .login-motif{
        font-size: 40px;
        div{
            display: flex;
            justify-content: center;
        }
        > :nth-child(1){
            height: 80px;
            margin-top:200px;
            >input{
                width: 70%;
                border:none;
                border-bottom: 1px solid @cc;
                outline: none;
                font-size: 40px;
                font-weight: bold;
                padding-left:30px; 
            }
            >input::placeholder {
                color: @99;
            } 
        }
        > :nth-child(2){
            height: 80px;
            margin-top:30px; 
            >input{
                width: 70%;
                border:none;
                border-bottom: 1px solid @cc;
                outline: none;
                font-size: 40px;
                font-weight: bold;
                color: #af9999;
                padding-left:30px; 
            } 
            >input::placeholder {
                color: @99;
            } 
        }
        > :nth-child(3){
            height: 80px;
            margin-top:100px; 
            >input{
                width: 70%;
                border-radius: 40px;
                border: none;
                font-size: 36px;
                font-weight: bold;
                color: white;
                background-color:@pink;
            } 
        }
    }
}   
</style>